<script setup>
import { onMounted,ref } from 'vue'

// 定义响应式数据
const count = ref(0)

//声明一个函数
const increment = () => {
  count.value++
}

//声明钩子函数
onMounted(() => {
  console.log('组件挂载完成')
})

</script>

<template>
<button @click="increment">{{count}}</button>
  
</template>

<style scoped>

</style>